//
//  MusicClassTableViewCell.m
//  K歌之王
//
//  Created by 小晓 on 16/1/3.
//  Copyright © 2016年 xiao. All rights reserved.
//

#import "MusicClassTableViewCell.h"

@interface MusicClassTableViewCell()

@property (strong,nonatomic) UILabel * musicNameLabel;
@property (strong,nonatomic) UIImageView *rightImageView;

@end

@implementation MusicClassTableViewCell


- ( instancetype ) initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]){
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        
        _musicNameLabel = [[UILabel alloc]initWithFrame:CGRectMake(15, 12, self.contentView.frame.size.width*0.5, 20)];
        [self.contentView addSubview:_musicNameLabel];
        
        UIView * lineView = [[UIView alloc]initWithFrame:CGRectMake(0, 43, [UIScreen mainScreen].bounds.size.width, 1)];
        lineView.backgroundColor = [UIColor groupTableViewBackgroundColor];
        [self.contentView addSubview:lineView];
    }
    return self;
}
- (void)updataCellViewWithHeadData:(NSString * )musicStr Style:(NSInteger) type {
    if(type == 1){
        _rightImageView = [[UIImageView alloc]initWithFrame:CGRectMake([UIScreen mainScreen].bounds.size.width-26, 12, 11, 20)];
        _rightImageView.image = [UIImage imageNamed:@"箭头右.png"];
        [self.contentView addSubview:_rightImageView];
    }
    _musicNameLabel.text = musicStr;
}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
